#ifndef EXPENSESBROWSER_H
#define EXPENSESBROWSER_H

#include <QWidget>

class QComboBox;
class QDate;
class QDateEdit;
class QLabel;
class QLineEdit;
class QTableView;
class QSortFilterProxyModel;
class QString;

class expensesModel;
class chartView;

class expensesBrowser : public QWidget
{
	Q_OBJECT
public:
	explicit expensesBrowser(QWidget *parent = 0);
	void updateModelData();
	void updateData();
	void restore();
	void updateTotals();
	void saveSettings();

signals:

public slots:
	void onDateBeginChanged(const QDate& date);
	void onDateEndChanged(const QDate& date);
	void onModeChanged(int index);
	void onDateModeChanged(int index);
	void onHeaderSectionShow(bool isShow);
	void onFilterEdited(const QString &text);
	void onFilterChanged(int);

private:
	QLabel *dateModeL;
	QComboBox *modeCB, *dateModeCB;
	QComboBox *filterCB;
	QLabel *sumPlanV, *sumBuyV;
	chartView *chartV;
	QTableView *expensesV;
	expensesModel *expensesD;
	QDateEdit *dateBegin, *dateEnd;
	QSortFilterProxyModel *expensesP;
};

#endif // EXPENSESBROWSER_H
